package weaver.batchchanges.cmd;

import com.engine.common.biz.AbstractCommonCommand;
import com.engine.common.entity.BizLogContext;
import com.engine.core.interceptor.CommandContext;
import weaver.conn.RecordSet;
import weaver.batchchanges.bean.BatchTasksChangesGlobalData;
import weaver.batchchanges.bean.BatchTasksChangesTempBean;
import weaver.batchchanges.util.CmdResultUtil;

import java.util.List;


/**
 * 获取批量变更临时任务台账表数据的cmd类
 */
public class GetBatchTasksChangesTempDataCmd extends AbstractCommonCommand<List<BatchTasksChangesTempBean>> {


    @Override
    public List<BatchTasksChangesTempBean> execute(CommandContext commandContext) {
        RecordSet rs = new RecordSet();

        String sql = "select id,bgrwjd,hdcjr from "+ BatchTasksChangesGlobalData.TEMPORARY_TASK_LEDGER_TABLE_NAME;
        rs.executeQuery(sql);
        List<BatchTasksChangesTempBean> listMapResult = CmdResultUtil.getResult(rs, BatchTasksChangesTempBean.class);

        return listMapResult;
    }



    @Override
    public BizLogContext getLogContext() {
        return null;
    }
}
